<style type="text/css">
.layui-layer-btn a {
    line-height: 25px;
}
</style>
<div class="el-col el-col-24">
    <div>
        <div class="header-box">
            <div class="logo">
                <div class="api-branch" style="display: none;">default</div>
            </div>
            <div class="right">
                <div class="punch-the-clock">
                </div>
                {if condition="$avatar == ''"}
                <img alt="头像" class="avatar"
                     src="__IMG__/default_avatar.jpg">
                {else /} <img alt="头像" class="avatar"
                              src="{$avatar}">
                {/if}
                <div class="status" style="display: none;">

                </div>
                <!--昵称-->
                <div class="right-name">{$nickname}</div>
                <div class="el-dropdown">
                    <span class="el-dropdown-link el-dropdown-selfdefine"
                          aria-haspopup="list" aria-controls="dropdown-menu-2671"
                          role="button" tabindex="0">
                        <div class="level">Lv 3</div>
                    </span>
                    <ul class="el-dropdown-menu el-popper" id="dropdown-menu-2671" style="display: none;">
                        <li tabindex="-1" class="el-dropdown-menu__item">账号状态</li>
                        <li tabindex="-1" class="el-dropdown-menu__item">账号信息</li>
                    </ul>
                </div>
                <div class="information iconfont icon-xinfeng">
                    <span class="before">0</span>
                </div>
                <!-- <a href="{:url('/home/index/logout')}"> -->
                    <button id="logout" class="logout">
                        退出
                    </button>
                <!-- </a> -->
            </div>
        </div>
        <div class="el-dialog__wrapper open-red-bag-dialog" style="display: none;">
            <div class="el-dialog el-dialog--center" style="width: 407px; margin-top: 15vh;">
                <div class="el-dialog__header"><span class="el-dialog__title"></span></div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script src="__JS__/common.js"></script>
<!-- 弹框 -->
<script src="__JS__/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
    //退出登录
    $(document).ready(function () {
        $("#logout").click(function () {
            layer.confirm('你确定要退出吗？', {icon: 3}, function (index) {
                layer.close(index);
                window.location.href = "{:url('/home/index/logout')}";
            });
        });
    });
</script>